package com.info33.platform.config.db;

import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author debj
 * @version 1.0
 * @date 2021/7/29 9:36
 */
@Slf4j
@Component
public class CustomIdGenerator implements IdentifierGenerator {

    private final UniqueOrderGenerate idWorker = new UniqueOrderGenerate(0, 0);

    @Override
    public Long nextId(Object entity) {
        return idWorker.nextId();
    }
}